Data transmission systems enable a number of nodes or "stations" to communicate with each other at high speeds at a distance. A station may be any one of a number of different types of devices, including computers and printers. The combination of a data transmission system and a number of stations coupled to the data transmission system is commonly known as a network. Networks transmit data and control information by addressed protocol data units, known as "frames" or "packets" depending on context. Stations typically include hardware and software for coupling the station to a data transmission system, generally using a common communication protocol. Examples of networks include Fiber Distributed Data Interface (FDDI), Token Ring, and Ethernet.TM. local area networks (LANs) and the Internet.TM. wide area network (WAN).
The overall architecture of most modern networks conforms to some close variant of the Open Systems Interconnect (OSI) reference model promulgated by the International Standards Organization as the "ideal" network architecture. This model outlines seven areas, or layers, for the network. These layers (from highest to lowest) are: Applications; Presentation; Session; Transport; Network; Data Link; and Physical. The last three layers are of interest here.
The Physical layer (layer 1) defines cable, connector and signaling specifications. The Data Link layer (layer 2) is generally broken into two sub-layers: Logical Link Control (LLC) on the upper half, and Medium Access Control (MAC) on the lower half, which deals with getting protocol data units on and off the physical layer. The Network layer (layer 3) makes certain that protocol data units sent from one station to another station actually gets to the desired destination in a reasonable period of time. Routing and flow control of protocol data units are performed in layer 3. Technically, layer 2 protocol data units are called frames, while layer 3 protocol data units are known as packets. However, protocol data units are often referred to generically as packets.
Many networks, such as FDDI, Token Ring and Ethernet LANs, are shared medium networks. In a shared medium environment, as the number of users on the network increases, the bandwidth available to each user decreases and performance degrades. Accordingly, network "switches" are often added to networks to link smaller segments of a network, thereby reducing the number of stations per network segment and improving performance. When a Layer 2 switch connects separate segments of a network, a form of frame switching takes place. Alternatively, a network can be split into subnetworks (subnets) connected by routers. When a Layer 3 router connects subnets, a form of packet switching takes place.
Switches (or "bridges") perform very fast bridging between small network segments with minimal network congestion. A layer 2 switch operates on frames at the MAC layer. Frames on a network are encoded using a definition referred to as a MAC format. On an IEEE 802 network (which includes Ethernet), frames are built around a MAC format which utilizes 6-byte station addresses. A frame sent from one station to another station on the same network includes two of these 6-byte addresses, a destination station address and a source station address. These 6-byte addresses are usually referred to as MAC addresses and every station has a unique 6-byte address. The two 6-byte addresses are contained in the MAC header portion of every frame sent on the network.
A layer 2 switch uses the two 6-byte MAC addresses to move frames between input and output ports of the switch. As frames arrive in a layer 2 switch, the destination address is extracted from the arriving frame. The switch looks up the destination address in a forwarding table and determines to which port on the switch the current frame should be sent. This process is called forwarding. The source address is extracted and added to the forwarding table if not already present. This process is known as "learning". Through this process of learning and forwarding, a layer 2 switch moves frames between its ports.
More particularly, when a switch receives a frame, it compares the frame's destination address with addresses in the forwarding table. One of these situations results:
If the frame's MAC destination address is on the same LAN segment as its source address, the switch discards the frame; all stations on that LAN have already received this frame. PA1 If the frame's MAC destination address is on a different LAN segment than its source address, the switch forwards the frame to that LAN segment. PA1 If there is no match for the frame's MAC destination address in the forwarding table, the switch forwards the frame to all coupled network segments except the one that received the frame. This is called flooding.
A router is a network device which operates on packets at a higher layer, typically layer 3. Layer 3 protocols, such as the Internet Protocol (IP), utilize their own addressing mechanism which is quite different than the 6-byte MAC addresses used in layer 2. These addresses in IP version 4 "IPv4" are 4-bytes in length. A data packet typically has the following layout, showing both layer 2 and layer 3 addresses:
Packet Layout Layer 2 (MAC) Header Layer 3 (IP) Header MAC MAC IP IP Packe Destination Ad- Source Ad- Source Ad- Destination t dress dress dress Address Data
In order for data packets to be sent between stations on different Layer 3 addressed subnets ("IP subnets"), a router is used. The router accepts packets from an input port connected to one IP subnet when the packets are addressed at layer 2 to the router. Such packets are destined for stations on another IP subnet connected to an output port of the router. The destination for the packet is defined by the layer 3 address contained in the packet. The router looks up the layer 3 address in an internal routing table, determines the destination layer 2 address that should receive the packet (which may be another router), and substitutes this new layer 2 address for the old layer 2 address within the packet. The packet is then sent out the appropriate destination port on the router to the destination IP subnet.
Because routing involves changes to the data packet as the router moves a packet from input port to output port, a router introduces delays into the movement of packets in the network. This delay is referred to as latency. For example, a typical router might be able to examine and route about 1,000 packets per second.
Layer 2 switches do not modify the packet and thus the latency surrounding switching is significantly smaller than the latency for routing. For example, a typical switch may be able to switch frames at a rate 10 times or more faster than a typical router. However, layer 2 switches do not examine the layer 3 address, and thus cannot switch packets between IP subnets.
Accordingly, the inventors have determined that it would be useful to have an apparatus and method that would allow switching of frames between IP subnets based upon layer 3 addresses. The present invention provides such an apparatus and method.